package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.DoctorServicePriceEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 医生问诊规则对象 doctor_service_price
 *
 * @author ym
 * @date 2020-09-14
 */
@ApiModel("医生问诊规则-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DoctorServicePriceUpdateParam extends BeanCovert<DoctorServicePriceEntity>{

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("医生主键")
    private Long doctId;

    @ApiModelProperty("服务项标识")
    @Size(max = 2, message = "服务项标识长度超过{max}", groups = {Add.class, Update.class})
    private String seriLabel;

    @ApiModelProperty("规则ID")
    private Long ruleId;

    @ApiModelProperty("价格")
    private BigDecimal dspPrice;

    @ApiModelProperty("状态：00 无效 01 有效 02 中间状态")
    @Size(max = 2, message = "状态：00无效01有效02中间状态长度超过{max}", groups = {Add.class, Update.class})
    private String state;

    @ApiModelProperty("创建时间")
    @NotNull(message = "创建时间不能为空", groups = Add.class)
    private Date createTime;

    @ApiModelProperty("生效时间")
    private Date validTime;

    @ApiModelProperty("失效时间")
    private Date invalidTime;

}
